home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 11 / Amoszine 11 (Disk 2 of 2).adf / Paul_Huckstepp_Source.lha / TDArticle.AMOS / TDArticle.amosSourceCode
Encoding:
AMOS Source Code  |  1992-10-04  |  17.0 KB  |  413 lines

  1. 'Total Domination Source Code
  2. '
  3. 'The Placement of buildings
  4. '
  5. 'In this part we shall take a look at the procedures that control  
  6. 'placement of the buildings, in many ways when I look back at this 
  7. 'code I find that there are many things that could have been shortened 
  8.  
  9.  
  10. Procedure PLACECASTLE[_PLAYER,_COST]
  11.  
  12. 'For each building procedure the program needs to know who is going to 
  13. 'own that building _PLAYER and how much money will be needed _COST 
  14.  
  15.       Screen 2 : Pen 1 : Paper 0
  16.       Cls 0
  17.       Text 12,8,"PLACE NEW CASTLE -          Select where to place"
  18.       Wait 50 : Cls 0
  19.  
  20. 'Using the message screen at the top of the screen the player is 
  21. 'informed that they are going to be placing a Castle 
  22.  
  23.       Do 
  24.       If Mouse Click=2 Then Pop Proc
  25.       Screen 2 : Ink 1,0
  26.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  27.       Screen 0 : MZ=Mouse Zone
  28.       If Mouse Key=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  29.       If Mouse Click=2 Then Pop Proc
  30.       Loop 
  31.  
  32. 'This short program loop is used to display the map coordinates on the 
  33. 'message screen and to make sure that the player wants to go ahead 
  34. 'The right mouse button allows the player to quit the operation
  35. 'whereas the left button sends the program to the procedure
  36. 'MZONETOMAPCOORD[MZ] which is used to convert a screen zone number 
  37. 'into a x,y position value, the the program is sent to the label HERE
  38.  
  39.       HERE:
  40.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  41.  
  42. 'This line makes sure that the player doesn't place the building on a
  43. 'square that they can not even see, simply by using a Point command
  44.  
  45.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  46.  
  47. 'Then the program checks to make sure that the player has enough money...
  48.  
  49.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  50.  
  51. 'and finally if the square isn't already occupied. 
  52.  
  53.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  54.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  55.       MAP(SX,SY)=12
  56.       OWN(SX,SY)=_PLAYER+1
  57.  
  58. 'If all this is ok then the program is told to place a construction icon on
  59. 'the square and then redraw the map. Once redrawn the correct icon 
  60. 'is given to the map data and the ownership of the building is set.
  61.  
  62.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  63.  
  64. 'The relevent funds are taken care of and finally... 
  65.  
  66.       Add CASTLE(_PLAYER),1 : Add _MAXSTORE(_PLAYER),20
  67.  
  68. 'One is added to the castle variable and a MAXSTORE variable is increased by 20
  69. 'This line of code will be different for every building
  70.  
  71.       CONS=1
  72.  
  73. 'The program is then informed that a construction has been made
  74.  
  75.       Wait 10 : Inc BUILDING
  76.  
  77. 'And then the variable of BUILDING is increased so that the player 
  78. 'can not build more than the number of men they have.
  79.  
  80.       Screen 2 : Cls 0
  81.  
  82. End Proc
  83.  
  84. Procedure PLACEWATCH[_PLAYER,_COST]
  85.       Screen 2 : Pen 1 : Paper 0
  86.       Cls 0
  87.       Text 12,8,"PLACE WATCH TOWER -          Select where to place"
  88.       Wait 50 : Cls 0
  89.       Do 
  90.       If Mouse Click=2 Then Pop Proc
  91.       Screen 2 : Ink 1,0
  92.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  93.       Screen 0 : MZ=Mouse Zone
  94.  
  95.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  96.       If Mouse Click=2 Then Pop Proc
  97.       Loop 
  98.       HERE:
  99.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  100.  
  101.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  102.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  103.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  104.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Screen 2 : Cls 0 : Screen Show 0
  105.       MAP(SX,SY)=13
  106.       OWN(SX,SY)=_PLAYER+1
  107.  
  108.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  109.       CONS=1
  110.  
  111.       Wait 10 : Inc BUILDING
  112.       Screen 2 : Cls 0
  113. End Proc
  114. Procedure PLACESSETTLER[_PLAYER,_COST]
  115.       Screen 2 : Pen 1 : Paper 0
  116.       Cls 0
  117.       Text 12,8,"PLACE SMALL SETTLEMENT -          Select where to place"
  118.       Wait 50 : Cls 0
  119.       Do 
  120.       If Mouse Click=2 Then Pop Proc
  121.       Screen 2 : Ink 1,0
  122.       Text 12,8,"Coordinates : "+Str$(MZ)+"  "
  123.       Screen 0 : MZ=Mouse Zone
  124.  
  125.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  126.       If Mouse Key=2 Then Pop Proc
  127.       Loop 
  128.       HERE:
  129.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  130.  
  131.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  132.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  133.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  134.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  135.       MAP(SX,SY)=14
  136.       OWN(SX,SY)=_PLAYER+1
  137.  
  138.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  139.       Add _MAXSETTLERS(_PLAYER),10
  140.       Wait 10 : Inc BUILDING
  141.       Screen 2 : Cls 0
  142.       CONS=1
  143.  
  144. End Proc
  145. Procedure PLACECSETTLER[PL,_COST]
  146.       Screen 2 : Pen 1 : Paper 0
  147.       Cls 0
  148.       Text 12,8,"PLACE SETTLEMENT CLUSTER -          Select where to place"
  149.       Wait 50 : Cls 0
  150.       Do 
  151.       Screen 2 : Ink 1,0
  152.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  153.       Screen 0 : MZ=Mouse Zone
  154.       If Mouse Key=2 Then Pop Proc
  155.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  156.       If Mouse Click=2 Then Pop Proc
  157.       Loop 
  158.       HERE:
  159.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  160.  
  161.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  162.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  163.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  164.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  165.       MAP(SX,SY)=15
  166.       OWN(SX,SY)=_PLAYER+1
  167.  
  168.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  169.       Add _MAXSETTLERS(_PLAYER),25
  170.       Wait 10 : Inc BUILDING
  171.       CONS=1
  172.       Screen 2 : Cls 0
  173. End Proc
  174. Procedure PLACEWALL[PL,_COST]
  175.       Screen 2 : Pen 1 : Paper 0
  176.       Cls 0
  177.       Text 12,8,"PLACE CITY WALL -          Select where to place                          "
  178.       Wait 50 : Cls 0
  179.       Do 
  180.       If Mouse Click=2 Then Pop Proc
  181.       Screen 2 : Ink 1,0
  182.       Text 12,8,"Coordinates : "+Str$(MZ)+"                               "
  183.       Screen 0 : MZ=Mouse Zone
  184.       If Mouse Key=2 Then Pop Proc
  185.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  186.       If Mouse Click=2 Then Pop Proc
  187.       Loop 
  188.       HERE:
  189.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  190.  
  191.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  192.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  193.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  194.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  195.       MAP(SX,SY)=5
  196.       OWN(SX,SY)=3
  197.  
  198.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  199.  
  200.       Wait 10 : Inc BUILDING
  201.       CONS=1
  202.       Screen 2 : Cls 0
  203. End Proc
  204. Procedure PLACEBARRACKS[PL,_COST]
  205.       Screen 2 : Pen 1 : Paper 0
  206.       Cls 0
  207.       Text 12,8,"PLACE ARMY BARRACKS -          Select where to place"
  208.       Wait 50 : Cls 0
  209.       Do 
  210.       If Mouse Click=2 Then Pop Proc
  211.       Screen 2 : Ink 1,0
  212.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  213.       Screen 0 : MZ=Mouse Zone
  214.       If Mouse Key=2 Then Pop Proc
  215.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  216.        If Mouse Click=2 Then Pop Proc
  217.      Loop 
  218.       HERE:
  219.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  220.  
  221.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  222.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  223.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  224.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  225.       MAP(SX,SY)=18
  226.       OWN(SX,SY)=_PLAYER+1
  227.  
  228.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  229.       Add _BARRACKS(_PLAYER),1
  230.       Wait 10 : Inc BUILDING
  231.       CONS=1
  232.       Screen 2 : Cls 0
  233. End Proc
  234. Procedure PLACELAB[PL,_COST]
  235.       Screen 2 : Pen 1 : Paper 0
  236.       Cls 0
  237.       Text 12,8,"PLACE SCIENCE LABORATORY -          Select where to place"
  238.       Wait 50 : Cls 0
  239.       Do 
  240.       If Mouse Click=2 Then Pop Proc
  241.       Screen 2 : Ink 1,0
  242.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  243.       Screen 0 : MZ=Mouse Zone
  244.       If Mouse Key=2 Then Pop Proc
  245.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  246.       If Mouse Click=2 Then Pop Proc
  247.       Loop 
  248.       HERE:
  249.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  250.  
  251.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  252.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  253.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  254.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  255.       MAP(SX,SY)=19
  256.       OWN(SX,SY)=_PLAYER+1
  257.  
  258.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  259.       Add LABS(_PLAYER),1
  260.       Wait 10 : Inc BUILDING
  261.       CONS=1
  262.       Screen 2 : Cls 0
  263. End Proc
  264. Procedure PLACEWOODMILL[PL,_COST]
  265.       Screen 2 : Pen 1 : Paper 0
  266.       Cls 0
  267.       Text 12,8,"PLACE WOOD MILL -          Select where to place"
  268.       Wait 50 : Cls 0
  269.       Do 
  270.       If Mouse Click=2 Then Pop Proc
  271.       Screen 2 : Ink 1,0
  272.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  273.       Screen 0 : MZ=Mouse Zone
  274.       If Mouse Key=2 Then Pop Proc
  275.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  276.       If Mouse Click=2 Then Pop Proc
  277.       Loop 
  278.       HERE:
  279.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  280.  
  281.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  282.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  283.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  284.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  285.       MAP(SX,SY)=20
  286.       OWN(SX,SY)=_PLAYER+1
  287.  
  288.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  289.       Add WOODCUT(_PLAYER),1
  290.       Wait 10 : Inc BUILDING
  291.       CONS=1
  292.       Screen 2 : Cls 0
  293. End Proc
  294. Procedure PLACEMINE[PL,_COST]
  295.       Screen 2 : Pen 1 : Paper 0
  296.       Cls 0
  297.       Text 12,8,"PLACE MINERAL MINE -          Select where to place"
  298.       Wait 50 : Cls 0
  299.       Do 
  300.       If Mouse Click=2 Then Pop Proc
  301.       Screen 2 : Ink 1,0
  302.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  303.       Screen 0 : MZ=Mouse Zone
  304.       If Mouse Key=2 Then Pop Proc
  305.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  306.       If Mouse Click=2 Then Pop Proc
  307.       Loop 
  308.       HERE:
  309.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  310.  
  311.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  312.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  313.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  314.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  315.       MAP(SX,SY)=21
  316.       OWN(SX,SY)=_PLAYER+1
  317.  
  318.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  319.       Add COALMINE(_PLAYER),1
  320.       Wait 10 : Inc BUILDING
  321.       CONS=1
  322.       Screen 2 : Cls 0
  323. End Proc
  324. Procedure PLACEBLACK[PL,_COST]
  325.       Screen 2 : Pen 1 : Paper 0
  326.       Cls 0
  327.       Text 12,8,"PLACE BLACKSMITH -          Select where to place"
  328.       Wait 50 : Cls 0
  329.       Do 
  330.       If Mouse Click=2 Then Pop Proc
  331.       Screen 2 : Ink 1,0
  332.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  333.       Screen 0 : MZ=Mouse Zone
  334.       If Mouse Key=2 Then Pop Proc
  335.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  336.       If Mouse Click=2 Then Pop Proc
  337.       Loop 
  338.       HERE:
  339.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  340.  
  341.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  342.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  343.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  344.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  345.       MAP(SX,SY)=22
  346.       OWN(SX,SY)=_PLAYER+1
  347.  
  348.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  349.       Add BLACKSMITH(_PLAYER),1
  350.       Wait 10 : Inc BUILDING
  351.       CONS=1
  352.       Screen 2 : Cls 0
  353. End Proc
  354. Procedure PLACEFOODFINDER[PL,_COST]
  355.       Screen 2 : Pen 1 : Paper 0
  356.       Cls 0
  357.       Text 12,8,"PLACE FOOD FINDER -          Select where to place"
  358.       Wait 50 : Cls 0
  359.       Do 
  360.       If Mouse Click=2 Then Pop Proc
  361.       Screen 2 : Ink 1,0
  362.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  363.       Screen 0 : MZ=Mouse Zone
  364.       If Mouse Key=2 Then Pop Proc
  365.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  366.       If Mouse Click=2 Then Pop Proc
  367.       Loop 
  368.       HERE:
  369.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  370.  
  371.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  372.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  373.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  374.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  375.       MAP(SX,SY)=23
  376.       OWN(SX,SY)=_PLAYER+1
  377.  
  378.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  379.       Add FOODFINDER(_PLAYER),1
  380.       Wait 10 : Inc BUILDING
  381.       CONS=1
  382.       Screen 2 : Cls 0
  383. End Proc
  384. Procedure PLACESTORE[PL,_COST]
  385.       Screen 2 : Pen 1 : Paper 0
  386.       Cls 0
  387.       Text 12,8,"PLACE STORE -          Select where to place"
  388.       Wait 50 : Cls 0
  389.       Do 
  390.       If Mouse Click=2 Then Pop Proc
  391.       Screen 2 : Ink 1,0
  392.       Text 12,8,"Coordinates : "+Str$(MZ)+"         "
  393.       Screen 0 : MZ=Mouse Zone
  394.       If Mouse Key=2 Then Pop Proc
  395.       If Mouse Click=1 : Screen 0 : MZONETOMAPCOORD[MZ] : Goto HERE : End If 
  396.       If Mouse Click=2 Then Pop Proc
  397.       Loop 
  398.       HERE:
  399.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))=31 : Screen 2 : Cls 0 : Text 12,8,"No Within Sight" : Wait 50 : Cls 0 : Pop Proc : End If 
  400.  
  401.       If Point(X Screen(X Mouse),Y Screen(Y Mouse))<>31 and MONEY(_PLAYER)<_COST Then Screen 2 : Cls 0 : Text 12,8,"Not enough funds" : Wait 100 : Pop Proc
  402.       If MAP(STX(_PLAYER),STY(_PLAYER))>1 Then Screen 2 : Cls 0 : Text 12,8,"You cannot build here" : Wait 50 : Pop Proc
  403.       SX=STX(_PLAYER) : SY=STY(_PLAYER)
  404.       MAP(SX,SY)=42 : Screen 2 : Cls 0 : Text 12,8,"Please Wait Updating..." : Screen Hide 0 : SIGHT : Get Icon Palette : Screen 2 : Cls 0 : Screen Show 0
  405.       MAP(SX,SY)=17
  406.       OWN(SX,SY)=_PLAYER+1
  407.  
  408.       MONEY(_PLAYER)=MONEY(_PLAYER)-_COST
  409.       Add STORES(_PLAYER),1 : Add _MAXSTORE(_PLAYER),50
  410.       Wait 10 : Inc BUILDING
  411.       CONS=1
  412.       Screen 2 : Cls 0
  413. End Proc